GravityCompat
Compatibility shim for accessing newer functionality from Gravity.
Properties
Functions
Link copied to clipboard
open fun apply(gravity: Int, w: Int, h: Int, @NonNull container: @NonNull Rect, @NonNull outRect: @NonNull Rect, layoutDirection: Int)
Apply a gravity constant to an object and take care if layout direction is RTL or not.
open fun apply(gravity: Int, w: Int, h: Int, @NonNull container: @NonNull Rect, xAdj: Int, yAdj: Int, @NonNull outRect: @NonNull Rect, layoutDirection: Int)
Apply a gravity constant to an object.
Link copied to clipboard
open fun applyDisplay(gravity: Int, @NonNull display: @NonNull Rect, @NonNull inoutObj: @NonNull Rect, layoutDirection: Int)
Apply additional gravity behavior based on the overall "display" that an object exists in.
Link copied to clipboard
Convert script specific gravity to absolute horizontal value.